


#include "sensor_api.h"




#define LCD_TEST
#define PSENSOR_TEST
#define LSENSOR_TEST

void API_TEST( void)
{
	lcd_set_backlight_keeptime( 10);

#ifdef LCD_TEST
	// LCD test
	printf("-------------- LCD API test --------------\n");
	lcd_set_backlight_ctrl_mode( LCD_CTRL_MODE_MANUAL);
	lcd_set_backlight_percent( 10);
	sleep(5);
	lcd_set_backlight_percent( 50);
	sleep(5);
	lcd_set_backlight_percent( 100);
	sleep(5);
	lcd_set_backlight_ctrl_mode( LCD_CTRL_MODE_AUTO);

#endif

#ifdef PSENSOR_TEST
	// PSENSOR test
	printf("-------------- PSENSOR API test --------------\n");

	lcd_set_backlight_keeptime( 10);
	lcd_set_backlight_ctrl_mode( LCD_CTRL_MODE_AUTO);
	psensor_enable( 1);	
	psensor_enable_log(1);
//	psensor_set_pslevel( 1);
//	psensor_enable( 0);
#endif

#ifdef LSENSOR_TEST
	// LSENSOR test
	printf("-------------- LSENSOR API test --------------\n");
	lcd_set_backlight_ctrl_mode( LCD_CTRL_MODE_AUTO);
	lsensor_enable( 1);
#endif


}

// int main(int argc, char *argv[])
// {
// 	sensor_init();
// 	API_TEST();
// 	while(1)	sleep(10);
// 	sensor_uninit();
// 	return 0;
// }


